package com.lais.record.user.mapper;

import com.lais.record.common.mapper.BaseMapper;
import com.lais.record.user.domain.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @Author: luowen
 * @Description:
 * @Date: Create in 15:19 2019/11/30
 */
public interface UserMapper extends BaseMapper<User> {

    @Select(value="select id,nickname,phone,birthday,avatar,status from t_user where phone = #{phone} and status = #{status}")
    User findByPhoneWithStatus(@Param("phone") String phone, @Param("status") String status);

    @Select(value="select id,nickname,phone,birthday,avatar,status from t_user where phone = #{phone}")
    User findByPhone(String phone);
}
